﻿using System;
using System.Text;

namespace BizElements.Core.ProviderComponents
{
    /// <summary>Renders aggregate function as SQL element.</summary>
    public interface IAggregateFunctionRenderer
    {
        /// <summary>
        /// Renders aggregate function as SQL element.
        /// </summary>
        /// <param name="aggregateFunction">Aggregate function.</param>
        /// <param name="dbms">Target DBMS.</param>
        /// <param name="output">StringBuilder to which SQL is appended.</param>
        /// <param name="allParameters">SQL parameter collection to which the object's and its children's
        /// parameters are added. After the rendering is done the collection contains all parameters with unique names.</param>
        void Render(AggregateFunction aggregateFunction, DbmsType dbms, StringBuilder output, DbParameterCollection allParameters);
    }
}